import axios from "@/utils/request";


//首页统计
export const getPanelHeader = (data) => {
  return axios.get("/sales/homepage/getPanelHeader", data);
};

export const getBarChart = (data) => {
  return axios.get("/sales/homepage/getBarChart", data);
};

//部门下拉框列表
export const getDepartmentList = (data) => {
  return axios.get("/sales/dict/getDepartmentList", data);
};


// 群发列表
export const massPlanGetList = (data) => {
  return axios.post("/sales/massPlan/getList", data);
};


// 邮件列表
export const templateGetList = (data) => {
  return axios.post("/sales/template/getList", data);
};


// 邮件模板下拉框
export const getListInfo = (data) => {
  return axios.get("/sales/template/getListInfo", data);
};

// 邮件模板创建
export const massPlanCreate = (data) => {
  return axios.post("/sales/massPlan/create", data);
};

// 添加至群发
export const companyAddToMass = (data) => {
  return axios.post("/sales/search/company/addToMass", data);
};


// 基础信息
export const getBasicInfo = (data) => {
  return axios.post("/sales/search/company/getBasicInfo", data);
};


// 最新动态
export const getPostList = (data) => {
  return axios.post("/sales/search/company/getPostList", data);
};


// 在职员工
export const getPeopleList = (data) => {
  return axios.post("/sales/search/company/getPeopleList", data);
};


// 商家店铺
export const getBusinessList = (data) => {
  return axios.post("/sales/search/company/getBusinessList", data);
};



// 职级查找
export const getPositionLevelList = (data) => {
  return axios.get("/sales/dict/getPositionLevelList", data);
};


// 群发计划职级查找
export const getPositionLevelSummaryList = (data) => {
  return axios.get("/sales/dict/getPositionLevelSummaryList", data);
};

// 邮件变量名
export const getEmailVariableList = (data) => {
  return axios.get("/sales/dict/getEmailVariableList", data);
};



// 群发列表下拉框
export const massPlanGetListInfo = (data) => {
  return axios.get("/sales/massPlan/getListInfo", data);
};

// 模板渲染展示
export const templateGetContent = (data) => {
  return axios.get("/sales/template/getContent", data);
};


// 启动|禁用
export const massPlanState = (data) => {
  return axios.post("/sales/massPlan/state", data);
};


// 客户列表
export const clientGetList = (data) => {
  return axios.post("/sales/client/getList", data);
};


// 客户列表
export const clientGetListInfo = (data) => {
  return axios.get("/sales/client/list/getListInfo", data);
};

// 新建列表
export const clientAddList = (data) => {
  return axios.post("/sales/client/addList", data);
};


// 文件上传
export const batchUploadByFile = (formData) => {
   const token = localStorage.getItem('bytesbayToken') || ''
  return axios.service({
    method: "POST",
    timeout: 60000 * 10,
    headers: {
      'Content-Type': 'multipart/form-data',
      token
    },
    data: formData,
    url: "/sales/client/batchUploadByFile"
  })
  
  
  
  // axios("/sales/client/batchUploadByFile", formData, {
  //   headers: {
  //       'Content-Type': 'multipart/form-data'
  //   }
  // });
};


// 文本框
export const batchUploadByInput = (data) => {
  return axios.post("/sales/client/batchUploadByInput", data);
};

// 删除
export const clientDelete = (data) => {
  return axios.post("/sales/client/delete", data);
};


// 立即营销
export const batchAddToMess = (data) => {
  return axios.post("/sales/search/company/batch/addToMass", data);
};


// 立即营销
export const detailGetMassList = (data) => {
  return axios.post("/sales/massPlan/detail/getMassList", data);
};


// 立即营销
export const clientaddToMass = (data) => {
  return axios.post("/sales/client/addToMass", data);
};


// AI生成JD
export const jobManageagiJD = (data) => {
  return axios.post("/bole/agic/generateJD", data);
};


// 新增
export const jobManageAdd = (data) => {
  return axios.post("/hr/jobManage/add", data);
};

//编辑
export const jobManageEdit = (data) => {
  return axios.post("/hr/jobManage/edit", data);
};



// 列表
export const jobManageGetList = (data) => {
  return axios.post("/hr/jobManage/getList", data);
};


// 发布状态
export const jobManageState = (data) => {
  return axios.post("/hr/jobManage/state", data);
};



// 币种
export const getCurrencyDropList = (data) => {
  return axios.get("/hr/dict/getCurrencyDropList", data);
};


// 点击浏览
export const previewEmail = (data) => {
  return axios.post("/hr/people/dialogue/previewEmail", data);
};

// 生成关键字
export const generateKeywords = (data) => {
  return axios.post("/bole/agic/generateKeywords", data);
};
